﻿using PBO.Network.Domain;
using PBO.Network.Enumerations;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace PBO.Network.Server
{
    public interface IBattleServerService
    {
        event ClientConnectedDelegate OnBattleClientConnected;
        event Action<PlayerMove> OnSetMove;
        event Action<byte, string, byte[]> OnSetTeam;
        event Action<string> OnPlayerExit;
        event Action<int, string, TieMessage> OnTie;
        event Func<BattleInfo> OnRequestBattleInfo;

        void SendRandomSeed(int seed);
        void SendRules(BattleRule[] rules);
        void SendMove(PlayerMove move);
        void SendTeam(byte position, string identity, byte[] team);
        void Exit(string identity);
        void Tie(string identity, TieMessage message);
        void TieExcept(int sessionID, string identity, TieMessage message);
        void TieRequestFail(int sessionID);
        void SendBattleSnapshot(BattleSnapshot snapshot);
        void SendBattleInfo(BattleInfo info);
    }
}
